package com.mfangsoft.zhuangjialong.article.mapper;

import java.util.List;

import com.mfangsoft.zhuangjialong.article.model.ArticleDetailModel;
import com.mfangsoft.zhuangjialong.article.model.ArticleEntity;
import com.mfangsoft.zhuangjialong.common.model.Page;
import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;
@WriterRepository
public interface ArticleEntityMapper {
    /**
     * 通过主键删除  
     *
     * @MLTH_generated
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 插入数据  
     *
     * @MLTH_generated
     */
    int insert(ArticleEntity record);

    int insertSelective(ArticleEntity record);

    /**
     * 通过主键查询数据 
     *
     * @MLTH_generated
     */
    ArticleEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ArticleEntity record);

    int updateByPrimaryKeyWithBLOBs(ArticleEntity record);

    /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
    int updateByPrimaryKey(ArticleEntity record);
    
    /**
     * 查询商户id查询文章列表
     *
     * @MLTH_generated
     */
    List<ArticleEntity> selectArticlesForPage(Page<ArticleDetailModel> param);

    /**
     * 根据商户id找到他创建的文章
     * @param node3
     * @return
     */
	List<Long> selectArticleIdsByUid(Long user_id);
	
	 /**
     * 查询文章详情
     *
     * @MLTH_generated
     */
	ArticleDetailModel selectDetailsByPrimaryKey(Long id);
    
    /*
     * 更新浏览量
     */
    int updateSeenTime(Long id);

    /**
     * 助手端的新闻列表
     * @param page
     * @return
     */
	List<ArticleDetailModel> selectHelperArticlesForPage(Page<ArticleDetailModel> page);

 
}